package com.qdlc.p2p.biz.executer.impl;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.qdlc.p2p.biz.executer.BaseExecuter;
import com.qdlc.p2p.biz.service.RateInterestService;
import com.qdlc.p2p.common.constant.Global;
import com.qdlc.p2p.common.constant.LogTplNid;
import com.qdlc.p2p.common.util.BeanUtil;

/**
 * 处理用户还款时，系统发放加息
 * 券额外收益相关的业务
 * @author wjx
 * @version 2.0
 * @date 2015年4月25日 上午9:51:16
 */
@Service
@Scope(value=ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class UpRateRepaySuccessExecuter extends BaseExecuter {
	
	private String accountLogType = LogTplNid.RATE_REPAY_INTEREST;

	@Override
	public void extend() {
		long collectionId = (Long) Global.getTransfer().get("collectionId");
		RateInterestService rateInterestService = (RateInterestService)BeanUtil.getBean("rateInterestService");
		rateInterestService.repayWebPayUpInterest(collectionId, accountLogType);
	}
}
